package com.pro.service;

import com.pro.pojo.JsCourseRecord;
import com.pro.pojo.JsUserCoupon;
import com.pro.pojo.JsUserCouponUsed;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface JsCouponsService {
    //查看优惠券模糊查
    public List<JsUserCoupon> selectCoupons(String couponName, String online, String grant, String startDate, String endDate,Integer limit, Integer page);
    public Integer countCoupons(String couponName, String online, String grant, String startDate, String endDate);

    //通过id查看优惠券详情
    public JsUserCoupon selectCouponById(Integer couponId);

    //删除优惠券
    public Boolean deleteCoupon(Integer couponId);
    //修改优惠券状态
    public Boolean updateCoupon(Integer couponId, Integer online, Integer updateId, String updateDate);
    //添加优惠券
    public Boolean addCoupons(JsUserCoupon jsUserCoupon);

    //查询用户优惠券
    public List<JsUserCoupon> selectUserCoupons(String account,String nickname,String endDate,Integer limit,Integer page);
    public Integer countUserCoupons(String account,String nickname,String endDate);

    //查看所有优惠券
    public List<JsUserCoupon> selectGiveCoupons(
                                            String couponName,
                                            Integer limit,
                                            Integer page);
    public Integer countGiveCoupons(String couponName);

    //为所有前台用户添加优惠券
    public Boolean addBeforeCoupons(List<JsUserCouponUsed> jsUserCouponUsed);

}
